{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}


<div class="container-fluid content-body">
	<div class="main">
		<!-- left side start-->
		{include admin.inc.menu}
		<!-- left side end-->


		<!-- main content start-->
		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">

				<!-- page breadcrumb start-->
				{include admin.inc.bread}
				<!-- page "breadcrumb end-->
				<!-- Nav tabs -->
				<ul class="nav nav-tabs">

					<li class="active"><a href="javascript:void(0);"><i class="glyphicon glyphicon-th-list"></i> 销售单列表</a></li>
					<!--<li><a href="/admin/index/edit"><i class="glyphicon glyphicon-edit"></i> 编辑销售单</a></li>-->

				</ul>
				<div class="inner-container">
					<form class="form-inline search-form" role="form">
						<input type="hidden" name="pagesize" value="{$pagesize}" >
						<!-- search form start -->
						<!--tmpl-search-->
						<div class="form-group">
							<select name="select_mix_option1" class="form-control input-sm" data-value="{$search_arr[select_mix_option1]}">
								<option value="sale_no">销售单号</option>
								<option value="contract_no">合同号</option>
								<option value="invoice_no">发货单号</option>
								<option value="order_no">订单号</option>

							</select>
						</div>
						<!-- searchinput -->
						<div class="form-group">
							<div class="input-group">

								<input type="text" class="form-control input-sm" maxlength="{maxlength}" placeholder="关键词" name="select_mix_option_value1" value="{$search_arr[select_mix_option_value1]}">
							</div>
						</div>

						<div class="form-group">
							<select name="select_mix_option2"  class="form-control input-sm"  data-value="{$search_arr[select_mix_option2]}">
								<option value="order_time">下单时间</option>
								<option value="pay_time">付款时间</option>
								<option value="delivery_time">发货时间</option>
							</select>
						</div>
						<!-- searchdatetime -->
						<div class="form-group">
							<div class="input-group">

								<input style="width:100px;" class="form-control form-control-inline input-sm mdate"  size="16" type="text"
									   name="start_time" value="{$search_arr[start_time]}"
									   placeholder="开始时间" />

								<div class="input-group-addon">
									-
								</div>
								<input style="width:100px;" class="form-control form-control-inline input-sm mdate"  size="16" type="text"
									   name="end_time" value="{$search_arr[end_time]}"
									   placeholder="结束时间" />
							</div>
						</div>

						<input type="hidden" name="order" value="{$order}">
						<button type="submit" class="btn btn-sm btn-success">搜索</button>
						{run exportBtn()}
						<!-- search form end -->
					<!--</form>
					<form id="J_List_Form">-->
						<div class="table-responsive">
							<table id="J_ListTable" class="table  table-hover  table-striped">
								<!--tmpl-listtable-->

								<!-- listblock -->
								<thead>
									<tr>
										<th width="20"><input type="checkbox" class="icheck check-all" /></th>

										<th>销售单号
										</th>
										<th>销售金额(￥)</th>
										<th>买家会员号</th>
										<th>订单号</th>
										<th>发货单号</th>
										<th>合同号</th>
										<th>下单时间</th>
										<th>付款时间</th>
										<th>发货时间</th>
										<th>支付方式</th>
										<th>配送方式</th>
									</tr>
								</thead>
								<tbody>
								{if empty($items)}
								<tr>
									<td style="text-align:center;" colspan="3" class="empty-table-td">{$emptyRecord}</td>
								</tr>
								{/if}
								{loop $items $value}
								<tr>
									<td><input type="checkbox" class="icheck" name="ids[]" value="{$value[sale_id]}"/></td>
									<!--tmpl-fieldlist-->
								
									<td>{$value[sale_no]}</td>
									<td>{$value[actual_amount]}</td>
									<td>{$value[username]}</td>
									<td><a href="{url /admin/order/detail.shtml?no=$value[order_no]}" target="_blank">{$value[order_no]}</a></td>
									<td>{$value[invoice_no]}</td>
									<td>{$value[contract_no]}</td>
									<td>{$value[order_time]}</td>
									<td>{$value[pay_time]}</td>
									<td>{$value[delivery_time]}</td>
									<td>{$value[pay_way]}</td>
									<td>{$value[shipping_way]}</td>

								</tr>
								{/loop}
								

							</table>

						</div>
						
					</form>
					<div class="text-right">
						{$pagemenu}
					</div>

				</div>
			</div>
		</section>
	</div>
</div>

<!--footer section start-->
{include admin.inc.footer}
<!--footer section end-->

<!--tmpl-script-->

<!-- template -->
<script id="editpanel" type="text/html">
	<div>
		<form id="editpanel-form" class="form-horizontal">
			<div class="row">&nbsp</div>
			<!--tmpl-fieldlist-->

			<!-- input -->
			<div class="form-group">
				<label > </label>
				<input  dtype="" class="form-control" maxlength="{maxlength}" name="data[sale_no]" placeholder="" required cname="" value="{[sale_no]}" />
			</div>
			<p class="help-block"></p>
			
			<!-- input -->
			<div class="form-group">
				<label > </label>
				<input  dtype="" class="form-control" maxlength="{maxlength}" name="data[order_id]" placeholder="" required cname="" value="{[order_id]}" />
			</div>
			<p class="help-block"></p>
			

			<!--tmpl-assocfields-->
		</form>
	</div>
</script>

<!-- pagescript -->
<script type="text/javascript">
	seajs.use("admin/trading_saleindex",function (parameter){
		
		/**--tmpl-templatejavascript--**/
		
		<!--tmpl-templatejavascript-->
		parameter.detailUrl="{$detail_url}";
		parameter.deleteUrl="{$delete_url}";
		parameter.editUrl="{$do_edit_url}";
		parameter.upload_url="{$upload_url}";
		parameter.image_search_url="{$image_search_url}";
		parameter.image_list_url="{$image_list_url}";
		
		parameter.init();		
	});
</script>


<script id="assocpage" type="text/html">
<div class="text-right">
	<ul class="pagination blog-pagination">
		<li><a class="assoc-page" data-page="{[prev]}" href="javascript:void(0);">上一页</a></li> 
		{[loop pages page]}

		<li {[if curr == page]}class="active"{[/if]}><a class="assoc-page" data-page="{[page]}"  href="javascript:void(0)">{[page]}</a></li> 

		{[/loop]}
		<li><a class="assoc-page" href="javascript:void(0);" data-page="{[nexts]}">下一页</a></li> 
	</ul>	
</div>
</script>
</body>
</html>
